From 6008737c5bf9a2eac5ea5713f0feecad8f3fa7c7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 16 Aug 2004 22:52:29 +0000 Subject: [PATCH] (move_if_not_intangible): Force POSITION to be between BEGV and ZV. --- src/intervals.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intervals.c b/src/intervals.c index 33ef9a34177..a822dafefcf 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2275,6 +2275,10 @@ move_if_not_intangible (position) pos = Fnext_char_property_change (pos, Qnil); } + else if (position < BEGV) + position = BEGV; + else if (position > ZV) + position = ZV; /* If the whole stretch between PT and POSITION isn't intangible, try moving to POSITION (which means we actually move farther -- 2.30.2